Why am I getting a 'could not convert string to float' error when reading my file